// 增删改减

import request from './request'

// 获取列表
export const getListApi=()=>{
    return request({
        url:'/list',
        method:'get'
    })
}

// 新增
export const addListApi = (data)=>{
    return request({
        url:'/list',
        method:'post',
        data
    })
}

// 删除
export const removeListApi = (id)=>{
    return request({
        url:`/list/${id}`,
        method:'delete'
    })
}
// 根据id获取详情
export const getItemByid = (id)=>{
    return request({
        url:`/list/${id}`,
        method:'get'
    })
}
// 修改
export const editListApi = (id,data)=>{
    return request({
        url:`/list/${id}`,
        method:'put',
        data
    })
}
